﻿using System;
using System.Collections.Generic;
using System.Windows.Forms;
using DevExpress.LookAndFeel;
using DevExpress.UserSkins;
using DevExpress.Skins;
using System.IO;
using System.Text;
using RMSM;

namespace AC
{
	static class Program
	{
		/// <summary>
		/// The main entry point for the application.
		/// </summary>
		[STAThread]
		static void Main()
		{
			Application.EnableVisualStyles();
			Application.SetCompatibleTextRenderingDefault(false);

			Application.CurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture("en-US");
			System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");
			System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("en-US");
			DevExpress.XtraEditors.Controls.Localizer.Active = new viLanguage();

			OfficeSkins.Register();
			BonusSkins.Register();
			SkinManager.Default.RegisterAssembly(typeof(FlatSkin).Assembly);
			SkinManager.EnableFormSkins();


			UserLookAndFeel.Default.SkinName = "MySkin_Seven Classic1";

			Session.AppPath = Application.StartupPath;
			if (Session.AppPath.EndsWith("\\") == false)
				Session.AppPath += "\\";

			try
			{
				Application.Run(new FrmMain());
			}
			catch (Exception ex)
			{
				try
				{
					File.AppendAllText(Session.AppPath + "bug.txt", DateTime.Now.ToString("dd/MM/yyyy  HH:mm:ss") + " : " + ex.Message + "\r\n\r\n" + ex.StackTrace + "\r\n----------------\r\n", Encoding.UTF8);
				}
				catch { }
			}
		}
	}
}
